1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class DestroyDestruction : MonoBehaviour {
6
7     
void Start () {
8         
9     }
10     
11     
void Update () {
12         
13     }
14
15     
void OnTriggerEnter2D(Collider2D collision) {
16         
if (collision.tag == "Destruction") {
17             Destroy(collision.gameObject);
18         }
19    
20         
if (collision.tag == "RingGroup") {
21             Destroy(collision.gameObject);
22         }
23     }
24 }



Trò chơi Halloween vui nhộn trong UNITY Engine 10.797 lượt xem

Gõ tìm kiếm nhanh...